import 'package:flutter/material.dart';
import '../Tab.dart';

class Register3 extends StatefulWidget {
  Register3({Key key}) : super(key: key);
  @override
  _Register3State createState() => _Register3State();
}

class _Register3State extends State<Register3> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Register3'),
      ),
      body: Center(child: Text('Register3')),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          // Navigator.pushNamed(context, '/');
          Navigator.of(context).pushAndRemoveUntil(
              MaterialPageRoute(
                  builder: (context) => Tabs(
                        currentIndex: 2,
                      )),
              (route) => route == null);
        },
        child: Text('返回'),
      ),
    );
  }
}
